<?php
/**
 * Created by PhpStorm.
 * User: 13469
 * Date: 2018/12/11
 * Time: 10:02
 */
header("Content-Type:application/json;charset=utf=8");
if(isset($_REQUEST["cid"])){
    $str=file_get_contents("./data/goodsData.json");
    $dataArr=json_decode($str);
    foreach ($dataArr as $item){
        if($item->cid==$_REQUEST["cid"]){
            print_r(json_encode($item));
            return ;
        }
    }
}